﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Citrix.XaAdminMobile.Model
{
    /// <summary>
    /// Event arguments for the model layer notifying subscribers of sessions being added or
    /// removed.
    /// </summary>
    internal class SessionsChangedArgs : EventArgs
    {
        /// <summary>
        /// Ctor.
        /// </summary>
        /// <param name="addedSessions">The set of added sessions, maybe null.</param>
        /// <param name="removedSessions">The of removed sessions, maybe null.</param>
        internal SessionsChangedArgs(List<ISessionModel> addedSessions, List<ISessionModel> removedSessions)
        {
            if (null == addedSessions)
            {
                this.AddedSessions = new List<ISessionModel>();
            }
            else
            {
                this.AddedSessions = addedSessions;
            }
            if (null == removedSessions)
            {
                this.RemovedSessions = new List<ISessionModel>();
            }
            else
            {
                this.RemovedSessions = removedSessions;
            }
        }

        /// <summary>
        /// The added sessions. Will never be null.
        /// </summary>
        public List<ISessionModel> AddedSessions
        {
            get;
            private set;
        }

        /// <summary>
        /// The removed sessions. Will never be null.
        /// </summary>
        public List<ISessionModel> RemovedSessions
        {
            get;
            private set;
        }
    }
}
